import Dayjs from 'dayjs';
export function filterTime(item) {
	if (!item.endTime) return '订单正在进行中';
	var x = Dayjs(item.startTime);
	var y = Dayjs(item.endTime);
	var duration = y.diff(x);
	const secondTime = Math.ceil(Number.parseInt(duration) / 60000);
	if (secondTime > 59) {
		const hour = (secondTime / 60).toFixed(0);
		const minute = secondTime % 60;
		return hour + '小时' + minute + '分钟';
	}
	const time = secondTime + '分钟';
	return time;
}
